Skip to content

fix(pm-stack/aggregator): validate project pool graph refs (#6224) - #6365

Merged
dezren39 merged 3 commits into
mainfrom
queue/10537-6224-pool-edge-validation
Nov 5, 2026
Merged

dezren39 merged 3 commits into
mainfrom
queue/10537-6224-pool-edge-validation

Conversation

@developing-today

@developing-today developing-today Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #6224

A Project-pool item whose blockedBy/blocks (or parentRef/epicRef) edge fails the shared isValidRef rule (#4952) no longer 500s the project page or throws the brief:

  • Gate (shared contract): isProjectPoolItem in projects.ts now validates every present edge ref through isValidRef instead of shape-only string checks — a malformed edge fails the item individually in poolFromFeed, per the gate's existing fail-soft contract.
  • Consumers (defense in depth for pools that bypass the feed):
    • brief.ts: malformed blockers are omitted and counted; the brief states the omission instead of throwing in refUrl, and the next action flags the malformed edges.
    • graph.ts: blockedSummary / hasGraphEdges ignore invalid refs.
    • epic-graph.ts / epics.ts: edges, blockers, and dependents are filtered through isValidRef.
    • render.ts: new poolRefLink helper renders a valid ref as a link and an invalid ref as plain text; used by the pool-graph chain, the per-epic ranked list, and the dependency list.
  • Tests: regression cases alongside the existing suites pinning unsafe-integer blockedBy, non-repo-qualified blockedBy, and unsafe blocks, each with a valid-ref control (brief, epic-graph, feed gate, graph/render).

Verification (laptop, worktree at this branch after merging current main):

  • Targeted suites brief / epic-graph / feed / graph / projects: 141 pass, 0 fail.
  • Full aggregator suite: 3162 pass / 5 fail / 1 error, all in untouched files (test/wip.test.ts, test/render.test.ts, test/meta-refresh.test.ts) — the same timeout/flaky pattern seen on clean main; no failing test touches the files in this diff.

Queue: task 10537 (tracking issue #6226).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@developing-today
developing-today Bot requested review from a team and dezren39 as code owners November 5, 2026 19:24
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 821a25a7-8662-4d0c-8a01-f2948998c8f3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…-edge-validation

# Conflicts:
#	pm-stack/aggregator/src/render.ts
@dezren39
dezren39 merged commit 03d1a21 into main Nov 5, 2026
1 check passed
@dezren39
dezren39 deleted the queue/10537-6224-pool-edge-validation branch November 5, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant